Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickTime Components /
Chapter 3 - Standard Image-Compression Dialog Components / Standard Image-Compression Dialog Components Reference
Standard Image-Compression Dialog Component Functions / Compressing Image Sequences


SCCompressSequenceFrame

The SCCompressSequenceFrame function continues a sequence-compression operation. You must call this function once for each frame in the sequence, including the first frame.

pascal ComponentResult SCCompressSequenceFrame 
                        (ComponentInstance ci, PixMapHandle src, 
                         Rect *srcRect, Handle *data, 
                         long *dataSize, short *notSyncFlag);
ci
Identifies your application's connection to a standard image-compression dialog component.
src
Contains a handle to the pixel map to be compressed.
srcRect
Contains a pointer to a portion of the pixel map to compress. This rectangle must be in the pixel map's coordinate system. If you want to compress the entire pixel map, set this parameter to nil.
data
Contains a pointer to a handle. The standard dialog component returns a handle to the compressed image data in the field referred to by this parameter. The component sizes that handle appropriately for the sequence.
Your application must not dispose of this handle. The standard dialog component disposes of the handle when you end the sequence by calling the SCCompressSequenceEnd function. If you need to lock the handle, be sure to save and restore the handle's state.
dataSize
Contains a pointer to a long integer. The standard dialog component returns a value that indicates the number of bytes of compressed image data that it returns. Note that this value will differ from the size of the handle referred to by the data parameter, because the handle is allocated to accommodate the largest image in the sequence.
notSyncFlag

Contains a pointer to a short integer that indicates whether the compressed frame is a key frame. If the frame is a key frame, the standard dialog component sets the field referred to by this parameter to 0; otherwise, the component sets this field to mediaSampleNotSync. You may use this field to set the sampleFlags parameter of the Movie Toolbox's AddMediaSample function.
RESULT CODES
scUserCancelled1Dialog box canceled--user clicked Cancel
Image Compression Manager errors (from CompressSequenceFrame function)


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help